package com.shop.Control;

import java.io.InputStream;
import java.io.StringBufferInputStream;

import com.opensymphony.xwork2.ActionSupport;
import com.shop.util.BeanUtil;

public class AbstractActionSupportOfStream extends ActionSupport {
	private static final long serialVersionUID = -7790956028742318000L;
	private InputStream inputStream;
	/**
	 * 此流相当于 getWriter().print()
	 */
	public InputStream getInputStream() {  
		return inputStream;
	}

	public void setInputStream(InputStream inputStream) { 
		this.inputStream = inputStream;
	}
	
	@SuppressWarnings("deprecation")
	public void print(String str){
		inputStream = new StringBufferInputStream(str);
	}
	public Object getBean(String beanName){
		return BeanUtil.getBean("memberServiceImpl");
	}
}
